﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Forget.Data;
using System.Data;
using System.Data.SqlClient;

namespace Forget.HRBLL
{
    public class Log
    {
        /// <summary>
        /// 记录日志
        /// </summary>
        /// <param name="source">产生日志的源</param>
        /// <param name="name">日志简介</param>
        /// <param name="details">内容</param>
        public static void WriteLog(string source, string name, string content)
        {
            if (!string.IsNullOrEmpty(source) && !string.IsNullOrEmpty(name))
            {
                if (string.IsNullOrEmpty(content))
                    content = "";
                HRBLL.Model.HRLog.AddHRLog(new Model.HRLog() { Source = source, Message = name, Details = content });
            }
        }
    }
}
